From 6cc3c3e1ce30bdb84742d35f4163212e1723f984 Mon Sep 17 00:00:00 2001 From: Edward E Date: Wed, 23 Nov 2016 14:35:39 -0600 Subject: [PATCH] babl-verify: fix win32 compile, with s/setenv/putenv/g Wouldn't compile on windows because putenv() takes 1 arg, not 2. Win32 has no setenv(), pippin said try using putenv() on all platforms. --- tools/babl-verify.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tools/babl-verify.c b/tools/babl-verify.c index 3e2a7e4..80174db 100644 --- a/tools/babl-verify.c +++ b/tools/babl-verify.c @@ -2,10 +2,6 @@ #include #include "babl/babl.h" -#ifdef _WIN32 -#define setenv(a,b,c) putenv((a),(b)) -#endif - int main (int argc, char **argv) { if (argc != 3) @@ -13,8 +9,8 @@ int main (int argc, char **argv) fprintf (stderr, "need two args, from and to babl-formats\n"); return -1; } - setenv ("BABL_DEBUG_CONVERSIONS", "1", 0); - setenv ("BABL_TOLERANCE", "100000.0", 0); + putenv ("BABL_DEBUG_CONVERSIONS" "=" "1"); + putenv ("BABL_TOLERANCE" "=" "100000.0"); babl_init (); babl_fish (babl_format(argv[1]), babl_format (argv[2])); babl_exit (); -- 2.30.2